#ifndef hal_errorcode_H
#define hal_errorcode_H

#include <stdint.h>

// 错误码状态
enum
{
    NORMAL_STATE = 0,
    ABNORMAL_STATE
};

// 错误码分类
typedef enum
{
    ERRORCODE_TYPE_MOTOR = 1,
    ERRORCODE_TYPE_LASER,
    ERRORCODE_TYPE_COM_SYSTEM,
    ERRORCODE_TYPE_NONE
} ErrorCodeTypeEn;

void hal_ErrorCodeWrite(ErrorCodeTypeEn ErrorCodeType, uint8_t code_form, uint8_t channel, uint8_t code);

void hal_ErrorcodeRead(ErrorCodeTypeEn ErrorCodeType, uint8_t channel, uint32_t *ErrorCodeFinal);

void hal_ErrorcodeReset();

#endif